package com.gxkj.projects.myshopx.entitys;

import com.gxkj.projects.myshopx.enums.SuppliersStates;
import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

@Entity
@Table(name = "suppliers")
public class Suppliers extends BaseModel{

    private static final long serialVersionUID = 45148739947309161L;

    @Column(name="name",nullable = false)
    @NotEmpty(message = "{suppliers.name.null}" )
    private String name;    //名称

    @Column(name="suppliers_desc",nullable = false)
    private String suppliersDesc;    //名称


    @Enumerated(EnumType.STRING)
    @Column(name="states",nullable = false)//状态
    @NotNull(message = "{states.null}")
    private SuppliersStates states;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSuppliersDesc() {
        return suppliersDesc;
    }

    public void setSuppliersDesc(String suppliersDesc) {
        this.suppliersDesc = suppliersDesc;
    }

    public SuppliersStates getStates() {
        return states;
    }

    public void setStates(SuppliersStates states) {
        this.states = states;
    }
}
